home *** CD-ROM | disk | FTP | other *** search
/ Champak 130 / Vol 130.iso / games / hummer.swf / scripts / __Packages / utils / FMusic.as next >
Encoding:
Text File  |  2007-01-08  |  10.3 KB  |  269 lines

  1. var ┬º\x01┬º = 354;
  2. while(true)
  3. {
  4.    if(eval("\x01") == 354)
  5.    {
  6.       set("\x01",eval("\x01") + 193);
  7.       ┬º┬ºpush(true);
  8.    }
  9.    else
  10.    {
  11.       if(eval("\x01") == 21)
  12.       {
  13.          set("\x01",eval("\x01") + 771);
  14.          ┬º┬ºpush(┬º┬ºpop() add ┬º┬ºpop());
  15.          break;
  16.       }
  17.       if(eval("\x01") == 547)
  18.       {
  19.          set("\x01",eval("\x01") - 526);
  20.          if(┬º┬ºpop())
  21.          {
  22.             set("\x01",eval("\x01") + 771);
  23.          }
  24.       }
  25.       else if(eval("\x01") == 792)
  26.       {
  27.          set("\x01",eval("\x01") - 744);
  28.          ┬º┬ºpush(true);
  29.       }
  30.       else if(eval("\x01") == 48)
  31.       {
  32.          set("\x01",eval("\x01") + 571);
  33.          if(┬º┬ºpop())
  34.          {
  35.             set("\x01",eval("\x01") - 42);
  36.          }
  37.       }
  38.       else
  39.       {
  40.          if(eval("\x01") == 619)
  41.          {
  42.             set("\x01",eval("\x01") - 42);
  43.             stop();
  44.             if(┬º┬ºpop())
  45.             {
  46.                set("\x01",eval("\x01") + 132);
  47.                pr._alpha = 0;
  48.                step = 10;
  49.                this.onEnterFrame = function()
  50.                {
  51.                   pr.gotoAndStop(Math.round(100 * _root.getBytesLoaded() / _root.getBytesTotal()));
  52.                   pr._alpha += step;
  53.                   if(pr._alpha > 100)
  54.                   {
  55.                      pr._alpha = 100;
  56.                      step = 0;
  57.                   }
  58.                   if(step < 0)
  59.                   {
  60.                      this._alpha += step;
  61.                   }
  62.                   if(this._alpha <= 0)
  63.                   {
  64.                      this._parent.loaded();
  65.                   }
  66.                   if(_root.getBytesLoaded() == _root.getBytesTotal())
  67.                   {
  68.                      step = -10;
  69.                   }
  70.                };
  71.                stop();
  72.             }
  73.             break;
  74.          }
  75.          if(eval("\x01") == 577)
  76.          {
  77.             set("\x01",eval("\x01") - 121);
  78.             ┬º┬ºpush(true);
  79.          }
  80.          else
  81.          {
  82.             if(eval("\x01") == 360)
  83.             {
  84.                set("\x01",eval("\x01") + 615);
  85.                break;
  86.             }
  87.             if(eval("\x01") != 456)
  88.             {
  89.                if(eval("\x01") == 975)
  90.                {
  91.                   set("\x01",eval("\x01") - 495);
  92.                   if(!_global.utils)
  93.                   {
  94.                      _global.utils = new Object();
  95.                   }
  96.                   ┬º┬ºpop();
  97.                   if(!_global.utils.FMusic)
  98.                   {
  99.                      utils.FMusic extends MovieClip;
  100.                      var _loc2_ = utils.FMusic = function()
  101.                      {
  102.                         super();
  103.                         this.music_arr = new Array();
  104.                         this.music_arr_indx = new Object();
  105.                         this.activeMusic = null;
  106.                         this.valume = 50;
  107.                         this.countLoop = 1000000;
  108.                         this.indexSound = 0;
  109.                      }.prototype;
  110.                      _loc2_.setLoop = function(loop)
  111.                      {
  112.                         this.countLoop = loop;
  113.                      };
  114.                      _loc2_.addMusic2 = function(nameMusic, url, compliteFunc, progressFunc, goal)
  115.                      {
  116.                         if(this[nameMusic] == undefined)
  117.                         {
  118.                            var _loc3_ = this.getNextHighestDepth();
  119.                            this.createEmptyMovieClip(nameMusic,_loc3_);
  120.                            var _loc2_ = new Sound(this[nameMusic]);
  121.                            _loc2_.onLoad = function(how)
  122.                            {
  123.                               trace("> MUSIC LOADED !!!!!!!!!!!!!!!!!!!!!!!!!!!");
  124.                               compliteFunc.apply(goal,[how]);
  125.                               if(how == false)
  126.                               {
  127.                                  this[nameMusic].removeMovieClip();
  128.                               }
  129.                            };
  130.                            _loc2_.loadSound(url);
  131.                            _loc2_.mc = this[nameMusic];
  132.                            this.music_arr.push(_loc2_);
  133.                            this.music_arr_indx[nameMusic] = Number(this.music_arr.length - 1);
  134.                         }
  135.                         else
  136.                         {
  137.                            compliteFunc.apply(goal,[true]);
  138.                         }
  139.                      };
  140.                      _loc2_.addMusic = function(nameMusic)
  141.                      {
  142.                         var _loc4_ = this.getNextHighestDepth();
  143.                         this.createEmptyMovieClip(nameMusic,_loc4_);
  144.                         var _loc3_ = new Sound(this[nameMusic]);
  145.                         _loc3_.attachSound(nameMusic);
  146.                         this.music_arr.push(_loc3_);
  147.                         this.music_arr_indx[nameMusic] = this.music_arr.length - 1;
  148.                      };
  149.                      _loc2_.setValume = function(val)
  150.                      {
  151.                         this.valume = val;
  152.                         for(var _loc3_ in this.music_arr)
  153.                         {
  154.                            this.music_arr[_loc3_].setVolume(val);
  155.                         }
  156.                      };
  157.                      _loc2_.playMusic2 = function(nameM)
  158.                      {
  159.                         trace("playMusic2 >>> " + this.music_arr_indx[nameM] + " " + nameM);
  160.                         this.playMusic(this.music_arr_indx[nameM]);
  161.                      };
  162.                      _loc2_.playMusic = function(index)
  163.                      {
  164.                         trace("PLAY >>>>>>>>>> " + this.activeMusic + " " + index);
  165.                         if(this.activeMusic != index)
  166.                         {
  167.                            if(index >= this.music_arr.length || index < 0 || index == undefined)
  168.                            {
  169.                               index = 0;
  170.                            }
  171.                            this.currentLoop = this.countLoop;
  172.                            this.lastMusic = this.activeMusic;
  173.                            this.activeMusic = index;
  174.                            var v0 = this.valume;
  175.                            this.onEnterFrame = function()
  176.                            {
  177.                               v0--;
  178.                               if(v0 <= 0)
  179.                               {
  180.                                  v0 = 0;
  181.                                  this.onEnterFrame = function()
  182.                                  {
  183.                                     v0++;
  184.                                     if(v0 >= this.valume)
  185.                                     {
  186.                                        v0 = this.valume;
  187.                                        this.onEnterFrame = null;
  188.                                     }
  189.                                     this.music_arr[this.activeMusic].setVolume(v0);
  190.                                  };
  191.                                  this.music_arr[this.lastMusic].stop();
  192.                               }
  193.                               this.music_arr[this.lastMusic].setVolume(v0);
  194.                            };
  195.                            this.music_arr[this.activeMusic].setVolume(0);
  196.                            this.music_arr[this.activeMusic].start(0,this.currentLoop);
  197.                            this.music_arr[this.activeMusic]._parent = this;
  198.                            this.music_arr[this.activeMusic].onSoundComplete = function()
  199.                            {
  200.                               this = this._parent;
  201.                               this.music_arr[this.activeMusic].start();
  202.                               v0 = this.valume;
  203.                               this.onEnterFrame = function()
  204.                               {
  205.                                  v0--;
  206.                                  this.music_arr[this.activeMusic].setVolume(v0);
  207.                                  if(v0 <= 0)
  208.                                  {
  209.                                     this.music_arr[this.activeMusic].stop();
  210.                                     this.onEnterFrame = null;
  211.                                     this.playMusic(this.activeMusic + 1);
  212.                                  }
  213.                               };
  214.                               this.music_arr[this.activeMusic].onSoundComplete = null;
  215.                            };
  216.                         }
  217.                      };
  218.                      _loc2_.stopMusic = function()
  219.                      {
  220.                         this.v0 = this.valume;
  221.                         this.onEnterFrame = function()
  222.                         {
  223.                            this.v0 -= 5;
  224.                            this.music_arr[this.activeMusic].setVolume(this.v0);
  225.                            if(this.v0 <= 0)
  226.                            {
  227.                               this.music_arr[this.activeMusic].stop();
  228.                               this.activeMusic = null;
  229.                               this.onEnterFrame = null;
  230.                            }
  231.                         };
  232.                      };
  233.                      _loc2_.pauseMusic = function(how)
  234.                      {
  235.                         if(how)
  236.                         {
  237.                            this.v0 = this.valume;
  238.                            this.onEnterFrame = function()
  239.                            {
  240.                               this.v0 -= 5;
  241.                               this.music_arr[this.activeMusic].setVolume(this.v0);
  242.                               if(this.v0 <= 0)
  243.                               {
  244.                                  this.music_arr[this.activeMusic].stop();
  245.                                  this.onEnterFrame = null;
  246.                               }
  247.                            };
  248.                         }
  249.                         else
  250.                         {
  251.                            this.playMusic(this.activeMusic);
  252.                         }
  253.                      };
  254.                      ┬º┬ºpush(ASSetPropFlags(utils.FMusic.prototype,null,1));
  255.                   }
  256.                   ┬º┬ºpop();
  257.                }
  258.                break;
  259.             }
  260.             set("\x01",eval("\x01") - 96);
  261.             if(┬º┬ºpop())
  262.             {
  263.                set("\x01",eval("\x01") + 615);
  264.             }
  265.          }
  266.       }
  267.    }
  268. }
  269.